<template>
  <div>
    <div align="center">
      <div style="position: absolute;top: 115px;left: 180px;right: 180px;">
        <van-row gutter="40" class="a-fadeinL">
          <van-col span="8" v-for="(item,index) in list " :key="index">
            <img
              v-if="item.url"
              :src="item.url"
              style="box-shadow: 5px 10px 10px rgb(28,32,44);border-radius: 10px; width:265px;height:160px"
              @click="toPath(item.id)"
            />
            <img
              v-else
              src="../assets/c1.png"
              style="box-shadow: 5px 10px 10px rgb(28,32,44);border-radius: 10px;"
              @click="toPath(item.id)"
            />
            <span
              style="color: white;font-size: 20px;display: block;padding: 5px 0px;"
            >{{item.name}}</span>
            <!--公司动态 -->
          </van-col>
        </van-row>
      </div>
    </div>
  </div>
</template>

<script>
let _this;
export default {
  name: "Other",
  data() {
    return {
      list: [],
      path_list: [
        "Dynamic",
        "/OtherInf2",
        "/News",
        "/OtherInf3",
        "/OtherInf",
        "/OtherInf33"
      ]
    };
  },
  created() {
    // 创建 vue 实例之前
    _this = this;
  },
  watch: {},
  mounted() {
    this.getList();
  },
  methods: {
    // 跳转页面
    toPath(id) {
      this.$router.push({
        path: this.path_list[id - 1],
        query: {
          pageId: id,
          
        }
      });
    },
    getList() {
	
      this.$http.get("/information/informationTypeset").then(res => {
        if (res.data.code == 200) {
          this.list = res.data.data;
        } else if (res.data.code == 500) {
          this.$notify(res.data.msg);
        }
      });
    }
  }
};
</script>

<style lang="less" scoped>
/deep/ .van-icon {
  font: 24px/1 "vant-icon";
}

/deep/ .van-row {
  margin-right: 0 !important;
}

.left /deep/ .van-icon {
  font: 48px/1 "vant-icon";
  color: rgb(56, 107, 146);
}

.left {
  position: absolute;
  top: 340px;
  left: 100px;
}

.right /deep/ .van-icon {
  font: 48px/1 "vant-icon";
  color: rgb(53, 86, 114);
}

.right {
  position: absolute;
  top: 340px;
  right: 100px;
}
</style>